<script setup lang="ts">
import LivePlayer from './components/LivePlayer.vue'
import ChatBox from './components/ChatBox.vue'
import StreamerInfo from './components/StreamerInfo.vue'
</script>

<template>
  <div class="live-container">
    <div class="main-content">
      <LivePlayer 
        streamUrl="https://example.com/stream"
        title="每日游戏直播"
        :viewerCount="1234"
      />
      <StreamerInfo
        name="主播昵称"
        avatar="/vite.svg"
        :followers="10000"
      />
    </div>
    <div class="chat-container">
      <ChatBox />
    </div>
  </div>
</template>

<style>
body {
  margin: 0;
  padding: 0;
  background: #242424;
}

#app {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1rem;
}

.live-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 1rem;
  height: calc(100vh - 2rem);
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-container {
  height: 100%;
}

@media (max-width: 1024px) {
  .live-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .chat-container {
    height: 400px;
  }
}
</style>